#define CB_LEVEL_PAL				0x8f
#define CB_LEVEL_NTSC				0xd4 //0x70
#define CR_LEVEL_PAL				0x53
#define CR_LEVEL_NTSC				0x06 //0x82
#define LUMA_LEVEL_PAL				0x51
#define LUMA_LEVEL_NTSC			    0x4d
#define CHRMA_LEVEL_PAL			    0x65
#define CHRMA_LEVEL_NTSC			0x63
#define FREQ_RESPONSE_PAL			0x102
#define FREQ_RESPONSE_NTSC		    0x102

#define CB_LEVEL_PAL_SD				0x85
#define CB_LEVEL_NTSC_SD            0x85
#define CR_LEVEL_PAL_SD				0x55
#define CR_LEVEL_NTSC_SD			0x55
#define LUMA_LEVEL_PAL_SD			0x52
#define LUMA_LEVEL_NTSC_SD			0x4e
#define CHRMA_LEVEL_PAL_SD			0x0c
#define CHRMA_LEVEL_NTSC_SD		    0x0c
#define FREQ_RESPONSE_PAL_SD		0x102
#define FREQ_RESPONSE_NTSC_SD		0x102

// for de_n
static struct tve_adjust g_tve_adjust_table[] = {
    {TVE_ADJ_COMPOSITE_Y_DELAY, SYS_625_LINE, 1}, {TVE_ADJ_COMPOSITE_Y_DELAY, SYS_525_LINE, 1}, //3 bits
    {TVE_ADJ_COMPOSITE_C_DELAY, SYS_625_LINE, 0}, {TVE_ADJ_COMPOSITE_C_DELAY, SYS_525_LINE, 0}, //3 bits
    {TVE_ADJ_COMPONENT_Y_DELAY, SYS_625_LINE, 3}, {TVE_ADJ_COMPONENT_Y_DELAY, SYS_525_LINE, 3}, //3 bits
    {TVE_ADJ_COMPONENT_CB_DELAY, SYS_625_LINE, 2}, {TVE_ADJ_COMPONENT_CB_DELAY, SYS_525_LINE, 2}, //2 bits
    {TVE_ADJ_COMPONENT_CR_DELAY, SYS_625_LINE, 0}, {TVE_ADJ_COMPONENT_CR_DELAY, SYS_525_LINE, 0}, //2 bits
    {TVE_ADJ_BURST_LEVEL_ENABLE, SYS_625_LINE, 1}, {TVE_ADJ_BURST_LEVEL_ENABLE, SYS_525_LINE, 0}, //1 bit
    {TVE_ADJ_BURST_CB_LEVEL, SYS_625_LINE, 0x8d}, {TVE_ADJ_BURST_CB_LEVEL, SYS_525_LINE, 0x70}, //8 bits
    {TVE_ADJ_BURST_CR_LEVEL, SYS_625_LINE, 0x58}, {TVE_ADJ_BURST_CR_LEVEL, SYS_525_LINE, 0x82}, //8 bits
    {TVE_ADJ_COMPOSITE_LUMA_LEVEL, SYS_625_LINE, 0x52}, {TVE_ADJ_COMPOSITE_LUMA_LEVEL, SYS_525_LINE, 0x52}, //8 bits
    {TVE_ADJ_COMPOSITE_CHRMA_LEVEL, SYS_625_LINE, 0x8}, {TVE_ADJ_COMPOSITE_CHRMA_LEVEL, SYS_525_LINE, 0x8}, //8 bits
    {TVE_ADJ_PHASE_COMPENSATION, SYS_625_LINE, 0x2b0}, {TVE_ADJ_PHASE_COMPENSATION, SYS_525_LINE, 0x4c8}, //16 bits
    {TVE_ADJ_VIDEO_FREQ_RESPONSE, SYS_625_LINE, 0x0}, {TVE_ADJ_VIDEO_FREQ_RESPONSE, SYS_525_LINE, 0x0}, //16 bits
};

static struct tve_adjust tve_adjust_table_adv[] = {
    {TVE_ADJ_ADV_PEDESTAL_ONOFF, SYS_625_LINE, 0},              {TVE_ADJ_ADV_PEDESTAL_ONOFF, SYS_525_LINE, 1},
    {TVE_ADJ_ADV_COMPONENT_LUM_LEVEL, SYS_625_LINE, 0x50},      {TVE_ADJ_ADV_COMPONENT_LUM_LEVEL, SYS_525_LINE, 0x50},
    {TVE_ADJ_ADV_COMPONENT_CHRMA_LEVEL, SYS_625_LINE, 0x4d},    {TVE_ADJ_ADV_COMPONENT_CHRMA_LEVEL, SYS_525_LINE, 0x4d},
    {TVE_ADJ_ADV_COMPONENT_PEDESTAL_LEVEL, SYS_625_LINE, 0x0},  {TVE_ADJ_ADV_COMPONENT_PEDESTAL_LEVEL, SYS_525_LINE, 0x9},
    {TVE_ADJ_ADV_COMPONENT_SYNC_LEVEL, SYS_625_LINE, 0x5},      {TVE_ADJ_ADV_COMPONENT_SYNC_LEVEL, SYS_525_LINE, 0xa},
    {TVE_ADJ_ADV_RGB_R_LEVEL, SYS_625_LINE, 0x8d},              {TVE_ADJ_ADV_RGB_R_LEVEL, SYS_525_LINE, 0x8d},
    {TVE_ADJ_ADV_RGB_G_LEVEL, SYS_625_LINE, 0x8d},              {TVE_ADJ_ADV_RGB_G_LEVEL, SYS_525_LINE, 0x8d},
    {TVE_ADJ_ADV_RGB_B_LEVEL, SYS_625_LINE, 0x8d},              {TVE_ADJ_ADV_RGB_B_LEVEL, SYS_525_LINE, 0x8d},
    {TVE_ADJ_ADV_COMPOSITE_PEDESTAL_LEVEL, SYS_625_LINE, 0x0},  {TVE_ADJ_ADV_COMPOSITE_PEDESTAL_LEVEL, SYS_525_LINE, 0x2b},
    {TVE_ADJ_ADV_COMPOSITE_SYNC_LEVEL, SYS_625_LINE, 0x0},      {TVE_ADJ_ADV_COMPOSITE_SYNC_LEVEL, SYS_525_LINE, 0x5},
};


